module top (
    input clk,
    input rst,
    input [15:0] sw,
    input ps2_clk,
    input ps2_data,
    input [4:0] button,
    output [15:0] ledr,
    output VGA_CLK,
    output VGA_HSYNC,
    output VGA_VSYNC,
    output VGA_BLANK_N,
    output [7:0] VGA_R,
    output [7:0] VGA_G,
    output [7:0] VGA_B,
    output [7:0] seg0,
    output [7:0] seg1,
    output [7:0] seg2,
    output [7:0] seg3,
    output [7:0] seg4,
    output [7:0] seg5,
    output [7:0] seg6,
    output [7:0] seg7
);

// LFSR
wire [7:0] num;
lfsr lfsr_1(
  .clk(button[0]),
  .reset(sw[0]),
  .Q(num)
);
bcd7seg bcd7seg_1(
  .b(num[3:0]),
  .en(1'b1),
  .h(seg0[7:1])
);
bcd7seg bcd7seg_2(
  .b(num[7:4]),
  .en(1'b1),
  .h(seg1[7:1])
);
assign ledr[7:0] = num;
endmodule
